package com.wst.system.server.entity.vo;

import com.alibaba.fastjson2.JSONObject;
import lombok.Data;


import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class PageSearchVo implements Serializable {

    @NotNull(message = "pageNum 不得为空")
    private Integer pageNum;

    @NotNull(message = "pageSize 不得为空")
    @Max(value = 1000)
    private Integer pageSize;

    private JSONObject search;

    public String getString(String key) {
        if (search == null) {
            return null;
        }
        return search.getString(key);
    }

}
